﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace F1010DB.Enums
{
    public static class EnumForMaster
    {
        public enum Equarator
        {
            COMPARE,
            CALC,
            COMPARE_AND_CALC,
            NONE
        }


        public enum Calc
        {
            ADD,
            SUBTRACT,
            MULTI,
            DEVIDE,
            NONE
        }

        public enum Logic
        {
            EQUAL,
            LESS_THAN,
            LESS_AND_EQUAL,
            GREATER_THAN,
            GREATER_AND_EQUAL,
            DIFF,
            NONE
        }

        public enum TypeMaster
        {
            INTERGER,
            DECIMAL,
            BOOLEAN,
            DATETIME,
            STRING,
            NONE
        }

    }

    public static class ConvertToEnum<T>
    {
        public static T converToEnumFinal(string value)
        {
            return (T)Enum.Parse(typeof(T), value, true);
        }
    }
}
